package com.wc.AlgoOJ_train.train1.c6.A609;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/10 22:12
 * @description Picture
 * http://43.138.190.70:8888/p/A609
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] wss = new String[76];
        String[] blanks = new String[76];
        StringBuffer line = new StringBuffer();
        StringBuffer blank = new StringBuffer();
        for (int i = 1; i <= 74; i++) {
            line.append('-');
            blank.append(' ');
            wss[i] = line.toString();
            blanks[i] = blank.toString();
        }
        while (sc.hasNextInt()) {
            int w = sc.nextInt();
            int h = sc.nextInt();
            StringBuffer ws = new StringBuffer();
            ws.append('+');
            ws.append(wss[w]);
            ws.append('+');
            StringBuffer hs = new StringBuffer();
            hs.append('|');
            hs.append(blanks[w]);
            hs.append('|');
            System.out.println(ws);
            for (int i = 0; i < h; i++) {
                System.out.println(hs);
            }
            System.out.println(ws);
        }
    }
}
